package com.leilei.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author: lei
 * @date: 2025-05-21 11:16
 * @desc:
 */
@Data
@ConfigurationProperties(prefix = "field-encrypt")
@Component
public class EncryptProperties {
    /**
     * 是否启用加解密
     */
    private boolean enabled = true;

    /**
     * SM4 密钥（16字节）
     */
    private String sm4Key;

    private EncryptType encryptType = EncryptType.SM4BASE64;

    private String encryptPrefix = "Enc_";


    public enum EncryptType {
        SM4HEX,
        SM4BASE64
        ,
    }
}
